#include "Originator.h"
#include "Caretaker.h"

#include <iostream>
using namespace std;

void test()
{
    Originator originator;
    Caretaker caretaker;
    originator.SetState("state1: attack=100");
    caretaker.add(originator.SaveStateMemento());
    
    originator.SetState("state2: attack=80");
    caretaker.add(originator.SaveStateMemento());

    cout << "current state: " << originator.GetState() << endl;
    cout << "debuff finish, go back state1" << endl;
    originator.GetStateFromMemento(caretaker.Get(0));
    cout << "current state: " << originator.GetState() << endl;
}

int main()
{
    test();
    return 0;
}